package com.feihao.zhou.dmeo02_IO;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;

public class BufferedInputStreamTest {
    public static void main(String[] args) throws IOException {
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("H:\\Test\\123.txt"));

        int len = 0;
        byte[] bytes = new byte[1024];

        while ((len = bis.read(bytes))!= -1){
            System.out.println(new String(bytes,0,len));
        }

        bis.close();
    }
}
